package com.zdlog.wenjuan.dao;

import com.zdlog.wenjuan.dataobject.FormInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @program: wenjuanSer
 * @PACKAGE_NAME: com.zdlog.wenjuan.dao
 * @author: Kuaile
 * @create: 2018-02-03 22:20
 **/
public interface FormInfoRepository extends JpaRepository<FormInfo,String>{

    FormInfo findByFormId(String formId);

    List<FormInfo> findByFormName(String formName);

    Page<FormInfo> findByUserId(String userId, Pageable pageable);

    List<FormInfo> findByFormNameLikeAndStatusOrderByCreateTimeDesc(String formName,Integer status);


    List<FormInfo> findByStatusOrderByCreateTimeAsc(Integer status);

}
